home *** CD-ROM | disk | FTP | other *** search
/ Mission 3 / Mission 3.zip / Mission 3.iso / texte / qed / src / memory.h < prev    next >
C/C++ Source or Header  |  1998-03-15  |  2KB  |  55 lines

  1. #ifndef _qed_memory_h_
  2. #define _qed_memory_h_
  3.  
  4. #define MAX_LINE_LEN    1023
  5.  
  6. #define TEXT(x)        ((char *)(x) + sizeof(ZEILE))
  7. #define NEXT(x)        (x=x->nachf)
  8. #define VORG(x)        (x=x->vorg)
  9. #define FIRST(x)        ((x)->head.nachf)
  10. #define LAST(x)        ((x)->tail.vorg)
  11. #define IS_FIRST(x)    ((x->vorg->info&HEAD)!=0)
  12. #define IS_LAST(x)    ((x->nachf->info&TAIL)!=0)
  13.  
  14. /* ZEILE->info */
  15. #define MARKED                1
  16. #define HEAD                2
  17. #define TAIL                4
  18. #define ABSATZ                8
  19. #define OVERLEN            16
  20.  
  21. #define IS_MARKED(x)        ((x->info&MARKED)!=0)
  22. #define IS_HEAD(x)        ((x->info&HEAD)!=0)
  23. #define IS_TAIL(x)        ((x->info&TAIL)!=0)
  24. #define IS_ABSATZ(x)        ((x->info&ABSATZ)!=0)
  25. #define IS_OVERLEN(x)    ((x->info&OVERLEN)!=0)
  26.  
  27.  
  28. extern ZEILEP     new_col            (char *str, int l);
  29. extern void        free_col            (ZEILEP col);
  30. extern ZEILEP    col_insert        (ZEILEP wo, ZEILEP was);
  31. extern void        col_append        (RINGP t, ZEILEP was);
  32. extern void        col_delete        (RINGP t, ZEILEP was);
  33.  
  34. extern void        col_concate        (ZEILEP *wo);
  35. extern void        col_split        (ZEILEP *col,int pos);
  36. extern int    col_offset        (ZEILEP col);
  37. extern int    col_einrucken    (ZEILEP *col);
  38.  
  39. extern void        INSERT            (ZEILEP *a, int pos, int delta, char *str);
  40. extern char        *REALLOC            (ZEILEP *a, int pos, int delta);
  41. extern ZEILEP     get_line            (RINGP r, long y);
  42.  
  43. extern void        init_textring    (RINGP r);
  44. extern long        textring_bytes    (RINGP r);
  45. extern void        free_textring    (RINGP r);
  46. extern void        kill_textring    (RINGP r);
  47. extern bool        doppeln            (RINGP old, RINGP new);
  48. extern bool        ist_leer            (RINGP r);
  49.  
  50. extern bool        ist_mem_frei    (void);
  51. extern void        init_memory        (void);
  52. extern void        kill_memory        (void);
  53.  
  54. #endif
  55.